package com.zhonghan.recharge.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.zhonghan.recharge.service.ExportService;

@Controller
public class ExportController {

	@Autowired
	private ExportService exportService;
	
	
	/**
	 * 导出卡段成Excel表格
	 * @param request
	 * @param response
	 * @param cards
	 * @param facePrice
	 * @param backMonth
	 */
	@RequestMapping(value="/admin/exportCards")
	public void exportCards(HttpServletRequest request, HttpServletResponse response,String name, String cards, Long cardNum, Integer facePrice,Long backMonth){
		
		try {
			exportService.exportCards(request,response,name,cards,cardNum,facePrice,backMonth);
		} catch (Exception e) {
			e.printStackTrace();
		}
		
	}
	
	
	
	
	
}
